package com.dts.controller;

import com.dts.entity.Emp;
import com.dts.service.EmpService;
import com.dts.utils.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("test")
public class TestController {

    @Autowired
    private RedisUtils redisUtils;

    @Autowired
    private EmpService empService;

    @RequestMapping("/hello")
    public String hello() {
        redisUtils.set("test1","hello world");
        System.out.println(redisUtils.get("test1"));
        List<Emp> emps = empService.selectAllEmp(null);
        System.out.println(emps);
        return "hello";
    }
}
